<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>VUE第四天 组件</title>
  <style>
    #app {
      border: 1px solid red;
    }
  </style>
</head>
<body>
  <div id="app">
    <p>hello</p>
    <offcn></offcn>
  </div>
  <script src="../vue.js"></script>
  <script>
    let vm = new Vue({
      el: '#app',
      data: {
        
      },
      // 局部注册
      components: {
        'offcn': {
          template: '<mark>999</mark>'
        }
      }
    })
  </script>
</body>
</html>